package com.monlyu.vo;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import com.monlyu.annotation.Comment;
import com.monlyu.vo.BaseVo;

/********************************************************************************
 * 
 * <b>功能描述☞</b>设备信息<br>
 * 
 * <b>开发公司☞</b>重庆唯尼科技有限公司<br>
 * <b>版权☞</b>本文件归重庆唯尼科技有限公司所有<br>
 * <b>项目名☞</b>NewsSys<br>
 * <b>文件路径☞</b>com.monlyu.vo.Devices.java<br>
 * <b>开发日期☞</b>2010-2-9 <br>
 * 
 * @author songjun
 * @since JDK 5
 * @version 1.0.8
 * 
 ********************************************************************************/
@Entity(name = "t_devices")
@Comment(common = "设备信息表")
public class Devices extends BaseVo {
	
	public static final long DEVICESTATUS_IN = 32;//设备库存中
	public static final long DEVICESTATUS_OUT = 33;//设备外借中
	public static final long DEVICESTATUS_APP = 34;//设备已经申请
	public static final long DEVICESTATUS_BAD = 35;//设备已经损坏
	
	@Id
	@Column(name = "d_id")
	@Comment(common = "设备id")
	private Long id;
	
	@Column(name = "d_deviceno")
	@Comment(common = "设备编号")
	private String deviceNo;
	
	@Column(name = "d_devicetype")
	@Comment(common = "设备类别")
	private long devicetype;

	@Column(name = "d_devicename",length = MAX_VCHAR_MYSQL)
	@Comment(common = "设备名称")
	private String deviceName;

	@Column(name = "d_isenable")
	@Comment(common = "设备是否可用")
	private boolean enable = true;

	@Column(name = "d_deviceinfo",length = MAX_VCHAR_MYSQL)
	@Comment(common = "设备说明信息")
	private String deviceInfo;

	@Column(name = "d_devicestate")
	@Comment(common = "设备当前状态")
	private long deviceState;
	
	@Column(name = "d_buydate")
	@Comment(common = "设备购买日期")
	private Date buyDate;	
	
	@ManyToOne
	@JoinColumn(name = "d_devicesupply")
	@Comment(common = "设备购买方信息")
	private DeviceSupply deviceSupply;
	
	
	public DeviceSupply getDeviceSupply() {
		return deviceSupply;
	}

	public void setDeviceSupply(DeviceSupply deviceSupply) {
		this.deviceSupply = deviceSupply;
	}

	public Date getBuyDate() {
		return buyDate;
	}

	public void setBuyDate(Date buyDate) {
		this.buyDate = buyDate;
	}


	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getDeviceName() {
		return deviceName;
	}

	public void setDeviceName(String deviceName) {
		this.deviceName = deviceName;
	}

	public String getDeviceInfo() {
		return deviceInfo;
	}

	public void setDeviceInfo(String deviceInfo) {
		this.deviceInfo = deviceInfo;
	}

	public long getDevicetype() {
		return devicetype;
	}

	public String getDeviceNo() {
		return deviceNo;
	}

	public void setDeviceNo(String deviceNo) {
		this.deviceNo = deviceNo;
	}

	public void setDevicetype(long devicetype) {
		this.devicetype = devicetype;
	}

	public long getDeviceState() {
		return deviceState;
	}

	public void setDeviceState(long deviceState) {
		this.deviceState = deviceState;
	}

	public boolean isEnable() {
		return enable;
	}

	public void setEnable(boolean enable) {
		this.enable = enable;
	}
}